package com.itheima.type;

public class TypeDemo2 {
    public static void main(String[] args) {
        // 目标：掌握表达式的自动类型转换的机制。
        int a = 12;
        byte b = 10;
        short c = 10;
        char ch = 'b'; // 98

        int rs = a + b + c + ch;
        System.out.println(rs);

        double rs1 = a + b + 2.0;
        System.out.println(rs1);

        // 面试题: 在表达式中，byte short char直接提成int运算符
        byte b1 = 10;
        byte b2 = 12;
        int b3 = b1 + b2;
        System.out.println(b3);
    }
}
